package student;

import java.util.Comparator;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2022-12-14
 * Time: 7:08
 */
public class Student {
    int id;
    private String name;
    private String  ms;
    private int age;
    private String gender;

    public Student(int id, String name, String ms, int age, String gender) {
        this.id = id;
        this.name = name;
        this.ms = ms;
        this.age = age;
        this.gender = gender;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMs() {
        return ms;
    }

    public void setMs(String ms) {
        this.ms = ms;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", ms='" + ms + '\'' +
                ", age=" + age +
                ", gender='" +((gender.equals("M"))?"男":"女") + '\'' +
                '}';
    }
}

